package co.edu.javeriana.konigsberg.xavier.entidad;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;


/**
 * The persistent class for the observacion database table.
 * 
 */
@Entity
@Table(name="observacion")
@NamedQueries({
		@NamedQuery(name="Observacion.findAll", query="SELECT o FROM Observacion o"),
		@NamedQuery(name="Observacion.findByParent", query="SELECT o FROM Observacion o WHERE o.programa.idPrograma = :idPrograma"),
		@NamedQuery(name="Observacion.deleteByParent", query="DELETE FROM Observacion WHERE programa.idPrograma = :idPrograma")
})
public class Observacion implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private BigInteger idobservacion;

	@Temporal(TemporalType.TIMESTAMP)
	private Date fecha;

	@ManyToOne
	@JoinColumn(name="idPrograma")
	private Programa programa;

	private String observacion;

	private String usuario;

	public Observacion() {
	}

	public BigInteger getIdobservacion() {
		return this.idobservacion;
	}

	public void setIdobservacion(BigInteger idobservacion) {
		this.idobservacion = idobservacion;
	}

	public Date getFecha() {
		return this.fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	public Programa getPrograma() {
		return this.programa;
	}

	public void setPrograma(Programa programa) {
		this.programa = programa;
	}

	public String getObservacion() {
		return this.observacion;
	}

	public void setObservacion(String observacion) {
		this.observacion = observacion;
	}

	public String getUsuario() {
		return this.usuario;
	}

	public void setUsuario(String usuario) {
		this.usuario = usuario;
	}

}